package com.bestow.lease.service.impl;

import java.util.List;
import com.bestow.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bestow.lease.mapper.HlsBpMasterBankAccountMapper;
import com.bestow.lease.domain.HlsBpMasterBankAccount;
import com.bestow.lease.service.IHlsBpMasterBankAccountService;

/**
 * 商业伙伴银行账户信息Service业务层处理
 * 
 * @author liliu
 * @date 2022-09-26
 */
@Service
public class HlsBpMasterBankAccountServiceImpl implements IHlsBpMasterBankAccountService 
{
    @Autowired
    private HlsBpMasterBankAccountMapper hlsBpMasterBankAccountMapper;

    /**
     * 查询商业伙伴银行账户信息
     * 
     * @param bankAccountId 商业伙伴银行账户信息主键
     * @return 商业伙伴银行账户信息
     */
    @Override
    public HlsBpMasterBankAccount selectHlsBpMasterBankAccountByBankAccountId(Long bankAccountId)
    {
        return hlsBpMasterBankAccountMapper.selectHlsBpMasterBankAccountByBankAccountId(bankAccountId);
    }

    /**
     * 查询商业伙伴银行账户信息列表
     * 
     * @param hlsBpMasterBankAccount 商业伙伴银行账户信息
     * @return 商业伙伴银行账户信息
     */
    @Override
    public List<HlsBpMasterBankAccount> selectHlsBpMasterBankAccountList(HlsBpMasterBankAccount hlsBpMasterBankAccount)
    {
        return hlsBpMasterBankAccountMapper.selectHlsBpMasterBankAccountList(hlsBpMasterBankAccount);
    }

    /**
     * 新增商业伙伴银行账户信息
     * 
     * @param hlsBpMasterBankAccount 商业伙伴银行账户信息
     * @return 结果
     */
    @Override
    public int insertHlsBpMasterBankAccount(HlsBpMasterBankAccount hlsBpMasterBankAccount)
    {
        hlsBpMasterBankAccount.setCreateTime(DateUtils.getNowDate());
        return hlsBpMasterBankAccountMapper.insertHlsBpMasterBankAccount(hlsBpMasterBankAccount);
    }

    /**
     * 修改商业伙伴银行账户信息
     * 
     * @param hlsBpMasterBankAccount 商业伙伴银行账户信息
     * @return 结果
     */
    @Override
    public int updateHlsBpMasterBankAccount(HlsBpMasterBankAccount hlsBpMasterBankAccount)
    {
        hlsBpMasterBankAccount.setUpdateTime(DateUtils.getNowDate());
        return hlsBpMasterBankAccountMapper.updateHlsBpMasterBankAccount(hlsBpMasterBankAccount);
    }

    /**
     * 批量删除商业伙伴银行账户信息
     * 
     * @param bankAccountIds 需要删除的商业伙伴银行账户信息主键
     * @return 结果
     */
    @Override
    public int deleteHlsBpMasterBankAccountByBankAccountIds(Long[] bankAccountIds)
    {
        return hlsBpMasterBankAccountMapper.deleteHlsBpMasterBankAccountByBankAccountIds(bankAccountIds);
    }

    /**
     * 删除商业伙伴银行账户信息信息
     * 
     * @param bankAccountId 商业伙伴银行账户信息主键
     * @return 结果
     */
    @Override
    public int deleteHlsBpMasterBankAccountByBankAccountId(Long bankAccountId)
    {
        return hlsBpMasterBankAccountMapper.deleteHlsBpMasterBankAccountByBankAccountId(bankAccountId);
    }
}
